{extend name="public:layout" /}
{block name="title"}cnzz配置{/block}
{block name="head"}{/block}
{block name="body"}
<div class="wrapper wrapper-content">
    <div class="ibox">
        <div class="ibox-content">
            <form method="post" class="form-horizontal" id="form">
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">cnzz站点</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入cnzz站点"
                               name="cnzz_site_id" value="{$info['cnzz_site_id']}"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">cnzz站点密码</label>
                    <div class="col-sm-4">
                        <input type="password" class="form-control" placeholder="请输入cnzz站点密码"
                               name="cnzz_view_pass" value="{$info['cnzz_view_pass']}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">是否激活</label>
                    <div class="col-sm-4">
                        <p class="form-control-static" id="isActive">
                            {eq name="info.is_active" value="1"}已激活{else/}待激活{/eq}
                        </p>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-10 col-sm-offset-2">
                        <button class="btn btn-primary" type="button" id="btnSub">保存内容</button>
                        <span id="validError"></span>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script>
    $(function () {
        ajaxSubForm('#btnSub',function(res){
            $('#isActive').text('成功激活！');
            location.href=res.url;
        })
    });
</script>
{/block}